#!/usr/bin/bash

condition=none

echo "Do you want to install base utils ?"
while [ $condition != "yes" ] && [ $condition != "no" ]; do
	read -p "(yes/no) " condition
done
if [ $condition == "yes" ]; then
	sudo pacman -Sy
	sudo pacman-key --lsign-key "farseerfc@archlinuxcn.org" "lilac@build.archlinuxcn.org"
	sudo pacman -S archlinuxcn-keyring yay
	
	# tools
	sudo pacman -S wget curl openssh
	
	# development tools
	sudo pacman -S gcc gdb
	sudo pacman -S cmake make ccache
	sudo pacman -S eigen
	
	# utils
	sudo pacman -S bat dust duf gitui lsd tealdeer 7-zip fzf neofetch btop
fi
condition=none


# to install desktop environment
echo "Do you want to install Desktop Environment ?"
while [ $condition != "yes" ] && [ $condition != "no" ]; do
	read -p "(yes/no) " condition
done
if [ $condition == "yes" ]; then
	bash ./de_install.sh
fi
condition=none

# to install tools
echo "Do you want to install some tools ?"
while [ $condition != "yes" ] && [ $condition != "no" ]; do
	read -p "(yes/no) " condition
done
if [ $condition == "yes" ]; then
	bash ./tools_install.sh
fi
condition=none

# to install opencv
echo "Do you want to install opencv ?"
while [ $condition != "yes" ] && [ $condition != "no" ]; do
	read -p "(yes/no) " condition
done
if [ $condition == "yes" ]; then
	bash ./opencv_install.sh
fi
condition=none


# to install arm-toolchains
echo "Do you want to install arm-toolchain ?"
while [ $condition != "yes" ] && [ $condition != "no" ]; do
	read -p "(yes/no) " condition
done
if [ $condition == "yes" ]; then
	bash ./arm_install.sh
fi
condition=none

# to install miniconda3
echo "Do you want to install miniconda3 ?"
while [ $condition != "yes" ] && [ $condition != "no" ]; do
	read -p "(yes/no) " condition
done
if [ $condition == "yes" ]; then
	bash ./miniconda_install.sh
fi
condition=none
